---
title: "coveragelimits_pkg stored procedure documentation"
summary: "Analysis of the coveragelimits_pkg Oracle package including business rules and operations."
status: draft
owner: "SAIF Corporation"
last_reviewed: 2026-08-31
source_schema: "WCIS_DBA"
source_name: "coveragelimits_pkg"
source_type: "PACKAGE"
retrieval_status: "found"
retrieval_command: "legends oracle query --name coveragelimits_pkg"
retrieval_date: "2026-08-31"
---

# coveragelimits_pkg

## Overview

| Field | Value |
| --- | --- |
| **Schema** | `WCIS_DBA` |
| **Type** | Package (5 members; 1 invoked by this library) |
| **Database** | Oracle |
| **Status** | ✅ `found` — retrieved via Legends CLI |
| **Query executed** | `legends oracle query --name coveragelimits_pkg` |
| **Calling libraries** | `SAIF.Business.View.Policy` |
| **Calling classes** | `clsPolicyPeriod` |

## Purpose

`coveragelimits_pkg` resolves employer-liability coverage limits for a policy period. Its 5 members
are `getCurrentLimitsForPolicyNum`, `getSpecificLimitsForPolicyNum`, `getFutureLimitsForPolicyNum`,
`getLimitValues`, and `getAllLimits`; this library invokes only `getSpecificLimitsForPolicyNum`.

## Procedures / Methods

### getSpecificLimitsForPolicyNum

| Field | Value |
| --- | --- |
| **Returns** | `limit_cursor` (IN OUT) |
| **Called by** | `clsPolicyPeriod.RetrieveEmployerLiabLimits` (`clsPolicyPeriod.vb:477-495`, SQL at `697`) |

**Description:** Resolves specific or standard employer-liability limits for a policy period through a
six-branch precedence union, with amounts pre-formatted for display (see rules PR-BVP-042, PR-BVP-043
in [Business Rules](#business-rules) below).

#### Parameters

| Parameter | Direction | Type | Default | Description |
| --- | --- | --- | --- | --- |
| `aPolicyNum` | IN | `NUMBER` | — | Policy number |
| `PeriodEffDate` | IN | `DATE` | — | Policy-period effective date |
| `recordset` | IN OUT | `limit_cursor` | — | Limit result set |

## Business Rules

Rules extracted from this package's logic:

| Rule ID | Rule | Condition | Action |
| --- | --- | --- | --- |
| PR-BVP-042 | Employer-liability limits resolve through a six-branch precedence union | always | (1) current specific limits (`prem_adjustment_eff_date <= SYSDATE` AND `NVL(prem_adjustment_exp_date, SYSDATE+1) > SYSDATE`); (2) regional/expired-period specific limits (max `prem_adjustment_eff_date`, `prem_adjustment_exp_date = policy_period_exp_date`); (3) standard limits when no specific row exists (`employers_liability_factors.standard_limits_flag = 'Y'`); (4) standard limits for expired regional policies; (5) older specific limits via `policy_period_non_wcis`; (6) standard limits on older periods via `policy_period_non_wcis` |
| PR-BVP-043 | Limit amounts are returned pre-formatted for display | always | `to_char(amount, '999,999,999,999')` |

> These rules are documented in [business-rules.md](../business-rules.md).

## Operations

Operations and processes implemented in this package:

| Operation | Description | Trigger |
| --- | --- | --- |
| Retrieve employer liability limits | Resolves specific or standard employer-liability limits for a policy period | `clsPolicyPeriod.RetrieveEmployerLiabLimits` (`clsPolicyPeriod.vb:477-495`, SQL at `697`) |

> These operations are also listed in [operations-processes.md](../operations-processes.md) with source reference back to this document.

## Source Code

<details>
<summary>PL/SQL procedure specification</summary>

```sql
PROCEDURE getSpecificLimitsForPolicyNum (aPolicyNum    IN     NUMBER,
                                         PeriodEffDate IN     DATE,
                                         recordset     IN OUT limit_cursor);
```

</details>

<details>
<summary>PL/SQL procedure body (rule-bearing excerpts)</summary>

```sql
-- Branch 1 of the six-branch precedence union: current specific limits
WHERE ppel.policy_num = aPolicyNum
  AND ppel.prem_adjustment_eff_date <= SYSDATE
  AND NVL (ppel.prem_adjustment_exp_date, SYSDATE + 1) > SYSDATE
...
-- Branch 3: fall back to standard limits when no specific row exists
AND NOT EXISTS (SELECT 1 FROM policy_period_emp_liab x WHERE ...)
AND elf.standard_limits_flag = 'Y'
...
to_char (amount, '999,999,999,999')
```

</details>

## Related Documentation
- [Procedure catalog](index.md)
- [Business rules](../business-rules.md)
- [Operations and processes](../operations-processes.md)
- [SQL catalog](../sql/index.md)

## Sources
- Oracle DBA_SOURCE: `WCIS_DBA.coveragelimits_pkg`
- Legends CLI query executed 2026-08-31: `legends oracle query --name coveragelimits_pkg`
- Calling code: `SAIF.Business.View.Policy/clsPolicyPeriod.vb:477-495, 697`
